package com.sgcc.nfc.lock.data.remote.api

import com.sgcc.nfc.lock.core.network.ApiResponse
import com.sgcc.nfc.lock.data.remote.dto.auth.LoginResponseDto
import com.sgcc.nfc.lock.data.remote.dto.auth.UserDto
import retrofit2.http.Body
import retrofit2.http.GET
import retrofit2.http.POST

interface AuthApi {

    @POST("/api/v1/auth/login")
    suspend fun login(@Body request: LoginRequest): ApiResponse<LoginResponseDto>

    @POST("/api/v1/auth/logout")
    suspend fun logout(): ApiResponse<Unit>

    @GET("/api/v1/auth/userinfo")
    suspend fun getUserInfo(): ApiResponse<UserDto>
}

data class LoginRequest(
    val username: String,
    val password: String
)
